const viewComponents = {};

const viewModules: Record<string, any> = import.meta.glob('/src/views/**/*.vue')

Object.keys(viewModules).forEach((componentPath: string) => {
  const viewModule = viewModules[componentPath];
  if (viewModule) {
    // #ifndef MP-WEIXIN
    // viewComponents[componentPath] = () => import(viewModule);
    // #endif
    // #ifndef APP-PLUS
    viewComponents[componentPath] = defineAsyncComponent(viewModule);
    // #endif
  }
})

export default viewComponents;
